package com.xuecheng.media.application.service;

import com.xuecheng.base.model.PageParams;
import com.xuecheng.base.model.PageResult;
import com.xuecheng.base.model.RestResponse;
import com.xuecheng.media.application.vo.req.MediaFilesPageQry;
import com.xuecheng.media.application.vo.resp.FileUploadResultDto;
import com.xuecheng.media.application.vo.resp.MediaFilesDto;
import com.xuecheng.media.domain.model.entity.MediaFiles;
import org.springframework.web.multipart.MultipartFile;

public interface MediaFilesApplication {
    FileUploadResultDto uploadFile(MultipartFile multipartFile, Long company, String objectName);

    RestResponse<Boolean> checkFile(String fileMd5);

    RestResponse<Boolean> checkChunk(String fileMd5, Integer chunk);

    RestResponse<Void> uploadChunk(MultipartFile file, String fileMd5, int chunk);

    RestResponse<Void> mergeChunks(String fileMd5, Integer chunkTotal, String filName, Long companyId);

    PageResult<MediaFilesDto> mediaFilesPage(PageParams pageParams, MediaFilesPageQry mediaFilesPageQry);

    MediaFiles getMediaFiesById(String mediaId);
}
